package com.canto.wanna.user.services.impl;

import com.canto.common.services.DataService;
import com.canto.wanna.user.dao.RoleDao;
import com.canto.wanna.user.pojo.doo.RoleDO;
import com.canto.wanna.user.pojo.entity.Role;
import com.canto.wanna.user.pojo.query.RoleQuery;
import com.canto.wanna.user.services.RoleService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 角色信息
 *
 * @Author jsryin
 * @Date 2021/7/17 11:11
 */
@Service
@Transactional(readOnly = true)
public class RoleServiceImpl extends DataService<RoleDao> implements RoleService {

    @Override
    public RoleDO get(RoleQuery query) {
        return super.get(query);
    }

    public List<RoleDO> findList(RoleQuery roleQuery) {
        return super.findList(roleQuery);
    }

    @Transactional(readOnly = false, rollbackFor = Exception.class)
    public long save(Role role) {
        return super.save(role);
    }

    @Transactional(readOnly = false, rollbackFor = Exception.class)
    public long delete(Role role) {
        return super.delete(role);
    }

}
